package com.assist.common.utils;

/**
 * Created by wuqiang on 2022/8/26 16:35
 */

public class MyHello {

    public void hello() {
        System.out.println("hello");
    }

    public void hello2() {
        System.out.println("hello2");
    }

    public static void main(String[] args) {
        String str = "a.b.c content = 2";

    }

    public static String getFileType(String fileTypeStr) {
        String[] splits = fileTypeStr.split("=");
        String filedTypeStr = splits[0].trim();
        String[] fieldTypes = filedTypeStr.split(" ");
        String fileType = fieldTypes[0];
        if (fileType.contains(".")) {
            return fileType.substring(fileType.lastIndexOf(".") + 1);
        }
        return fileType;
    }
}
